The present invention generally relates to image and video processing. More specifically, the present invention relates to a filter unit that can reduce or eliminate block and banding artifacts resulting from compression of image and/or video signals. The present invention also relates to a method of de-blocking and de-banding the image and/or video signals with the filter unit. Furthermore, the present invention also relates to dynamically adjusting filter strength of the filter unit based on gray level information and quantization parameters of the image and/or video signals.
For modern video compression standards, block-based coding has become a popular solution for video compression. For example, commonly-utilized video compression standards such as MPEG-1, MPEG-2, MPEG-4, and HEVC/H.265 utilize block-based coding. However, the coarse quantization of the frequency transform components, which are typically assembled in non-overlapping blocks with independent processing, is prone to generating visible grid patterns in decoded frames. These grid patterns are typically aligned on transform block boundaries for intra frames, and conventional motion compensation process spread the grid patterns into P and B frames. Therefore, “blocking artifacts” (i.e. interchangeably called herein as “blocking effects”) can be located anywhere inside related images generated by the block-based coding video compression methods. A blocking artifact is an undesirable visual effect caused by heavy quantization errors that coarsely produce identical or similar values for image and/or video information during a compression encoding process.
Furthermore, another undesirable visual effect called “banding artifacts” (i.e. interchangeably called herein as “banding effects”) appear when a quasi-horizontal or quasi-vertical transition occurs near block borders. Banding artifacts may spread over a large amount of block boundaries, thus making the duration of the artifacts unpredictable. A banding artifact may be construed as a collection of blocking artifacts on several adjacent macro blocks to form a larger-size blocking artifact.
Numerous de-blocking algorithms have attempted to alleviate blocking and banding artifacts for video processing. For example, a two dimensional signal-adaptive filtering has been utilized, and has worked satisfactorily for still-coded images that exhibit blocking artifacts at block boundaries. However, because blocking artifacts in video coding can occur at any position in a frame, a conventional two dimensional signal-adaptive filtering is generally insufficient to remove blocking artifacts in video data. Another conventional attempt to reduce blocking and banding artifacts in video utilizes a one-dimensional vertical filter to remove horizontal edges first, followed by a one-dimensional horizontal filter to remove vertical edges. Although the conventional sequential application of the one-dimensional vertical filter and the one-dimensional horizontal filter is sometimes effective in reducing undesirable artifacts, its effectiveness is inherently limited by its inability to adjust filter strengths dynamically relative to video characteristics and compression parameters.
For example, a conventional de-blocking and/or de-banding filter typically detects maximum and minimum pixel values in a processing area. If the difference between the maximum and the minimum is smaller than a static (i.e. pre-set) threshold value, pixels in the processing area is low-pass filtered to remove blocking and/or banding artifacts. Unfortunately, the static nature of the threshold value in the conventional de-blocking and/or de-banding filter is not dynamically adaptable to compression levels or to particular video characteristics undergoing processing. Therefore, if the static threshold value is set too low, then at least some of the undesirable artifacts cannot be filtered out. On the other hand, if the static threshold is set too high, then the conventional filter inadvertently filters out useful detail information in a video image frame.
Moreover, as viewers' usage of bandwidth continue to increase in multimedia applications, a high bit-rate compression is not always feasible or accessible for transmission of video contents. Utilizing lower bit-rate compression in such situations increases occurrences of blocking and banding artifacts in the reproduction of video contents.
Therefore, it may be desirable to provide a novel de-blocking and de-banding filter that can dynamically adjust its filter strength based on compression levels and particular characteristics of video data that are most relevant to human visual perception. Furthermore, it may also be desirable to provide a method of operating the novel de-blocking and de-banding filter for dynamically-adjusted filtering of undesirable visual artifacts in image and/or video data based on compression levels and particular characteristics of video data that are most relevant to human visual perception.